
#include <OsgExTool/CustumGeometry>


CustumGeometry::CustumGeometry()

{

}

CustumGeometry::CustumGeometry(const CustumGeometry& geometry, const osg::CopyOp& copyop) : osg::Geometry(geometry, copyop)
{
  


}

CustumGeometry::~CustumGeometry()
{

}



void CustumGeometry::drawImplementation(osg::RenderInfo& /*renderInfo*/) const
{
	glBegin(GL_QUADS);

	glVertex3f(mVertex[0][0], mVertex[0][1], mVertex[0][2]);
	glVertex3f(mVertex[1][0], mVertex[1][1], mVertex[1][2]);
	glVertex3f(mVertex[2][0], mVertex[2][1], mVertex[2][2]);
	glVertex3f(mVertex[3][0], mVertex[3][1], mVertex[3][2]);

	glEnd();
}

void CustumGeometry::setQuad(osg::Vec3f v1, osg::Vec3f v2, osg::Vec3f v3, osg::Vec3f v4)
{
	mVertex[0] = v1;
	mVertex[1] = v2;
	mVertex[2] = v3;
	mVertex[3] = v4;
}









